package com.zhuang.principle.singleResponsibility;

/**
 * @Classname SingleResponsibility1
 * @Description 单一职责错误示范
 * @Date 2021/3/15 12:48
 * @Created by dell
 */

public class SingleResponsibility1 {

    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("汽车");
        vehicle.run("摩托车");
        vehicle.run("飞机");
    }
}
class Vehicle{
    public void run(String vehicle){
        System.out.println(vehicle+" 在公路中运行...");
    }
}
